package com.xhtt.modules.msg.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;
import java.util.Set;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 消息表
 * </p>
 *
 * @author feipc
 * @since 2019-03-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class MsgInfo {
    public MsgInfo() {
    }

    public MsgInfo(String mainType, String type, String title, String content) {
        this.mainType = mainType;
        this.type = type;
        this.title = title;
        this.content = content;
    }

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 大类
     */
    private String mainType;

    /**
     * 小类
     */
    private String type;

    /**
     * 标题
     */
    private String title;

    /**
     * 内容
     */
    private String content;

    private Integer ralateId;

    private LocalDateTime createTime;

    @TableField(update = "now()")
    private LocalDateTime updateTime;

    private Integer createUserId;

    private Integer updateUserId;

    @TableField(exist = false)
    private Set<Integer> userIdList;

    @TableField(exist = false)
    private int unReadCount;
    @TableField(exist = false)
    private int status;


}
